<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="./static/vue/2.6.10/vue.js" type="text/javascript"></script>
    <title>Title</title>
</head>
<body>

    <div id="app-8">
        <ol>
            <todo-item
                    v-for="item in groceryList"
                    v-bind:todo="item"
                    v-bind:key="item.id">
            </todo-item>
        </ol>
    </div>
</body>
<script type="text/javascript">
    Vue.component('todo-item', {
        props: ['todo'],
        template: '<li>{{todo.text}}</li>'
    });

    let vm = new Vue({
        el: '#app-8',
        data: {
            groceryList: [
                {id: 0, text: '蔬菜'},
                {id: 1, text: '奶酪'},
                {id: 2, text: '随便其它什么人吃的东西'}
            ]
        }
    });
</script>
</html>